<?php require_once 'source.php';?>
<?php require_once 'config.php';?>
<?php require_once 'dao/dao_db.php';?>
<?php require_once 'dao/dao_sys_manage.php';?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo SYSTITLE?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<div class="wrapper">
<?php require_once 'header.php';?>
<div id="layout">
	<div id="leftlay"><?php require_once 'leftnav.php';?></div>
	<div id="rightlay">
		<div class="columntitle"><?php echo CREATEDISCUSSION?></div>
		<div class="columncontent">
		<?php 
			$result=is_bbs_on();
			mysql_close();
			$row=mysql_fetch_array($result);
			if($row['BBSSWITCH']==OFF){
				header('Location: error.php?errcode=2');
			}
		?>
			<div id="news">
				<form action="service/service_save_questions.php" method="post">
					<div id="newstype">
						<?php 
							if($_SESSION['level']==TEACHER||$_SESSION['level']==STUDENT){
						?>
						<label><input type="radio" name="questiontype" checked="checked" value="<?php echo GROUPQUESTIONCODE?>"/> <span><?php ECHO GROUPQUESTION?></span></label>
						<label><input type="radio" name="questiontype" value="<?php ECHO PUBLICQUESTIONCODE?>"/> <span><?php ECHO PUBLICQUESTION?></span></label>
						<?php }?>
					</div>
					<div id="title">
						<h2><?php echo REPORTTITLE?></h2>
						<input type="text" name="questiontitle" value=""/>
					</div>
					<div id="content">
						<h2><?php echo REPORTCONTENT?></h2>
						<textarea name="questioncontent"></textarea>
					</div>
					<div id="submit"><input type="submit" value="<?php echo SUBMIT?>"/></div>
				</form>
			</div>
		</div>
	</div>
</div>
</div>
</body>
</html>
